<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="renderer" content="webkit">
    <link rel="stylesheet" href="mdui/css/mdui.min.css">
    <script src="js/axios.min.js"></script>
    <script src="js/qs.min.js"></script>
    <script defer src="mdui/js/mdui.min.js"></script>
    <script defer src="js/index.js"></script>

    <script>
        // //判断是否登录
        // //如果未登录跳转到登录页面
        //
        // axios.get("/student/online")
        //     .then(function (res) {
        //         if (!res.data.success) {
        //             mdui.alert("用户不在线请登录")
        //             window.setTimeout(function () {
        //                 location.href = 'login.html'
        //             }, 3000)
        //         }
        //     });

        //退出

        function logout() {
            console.log(123)
            axios.get("/student/logout")
                .then(function (res) {
                    if (res.data.success) {
                        location.href = 'login.html'

                    } else {
                        mdui.alert("操作失败")
                    }
                })
        }
    </script>
</head>

<body class="mdui-drawer-body-left
    mdui-appbar-with-toolbar
    mdui-theme-primary-indigo
    mdui-theme-accent-pink
    mdui-theme-layout-auto">

<header class="mdui-appbar mdui-appbar-fixed" id="mdui-header">
    <div class="mdui-toolbar mdui-color-theme">
            <span class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white"
                  mdui-drawer="{target: '#main-drawer', swipe: true}">
                <i class="mdui-icon material-icons">menu</i>
            </span>
        <a href="" class="mdui-typo-title">校园报修管理系统</a>
        <div class="mdui-toolbar-spacer"></div>
        <a onclick="logout()" target="_blank"
           class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white"
           mdui-tooltip="{content: '退出'}"
        >
            <i class="mdui-icon material-icons">exit_to_app</i>
        </a>
    </div>
</header>


<div class="mdui-drawer" id="main-drawer">
    <div class="mdui-list" mdui-collapse="{accordion: true}" style="margin-bottom: 76px;">

        <div class="mdui-collapse-item">
            <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
                <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-blue">menu</i>
                <div class="mdui-list-item-content">报修单</div>
                <i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
            </div>
            <div class="mdui-collapse-item-body mdui-list">
                <a href="repair/list.html" class="mdui-list-item mdui-ripple">查看</a>
                <a href="repair/add.html" class="mdui-list-item mdui-ripple">添加保修单</a>
            </div>
        </div>


        <div class="mdui-collapse-item ">
            <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
                <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-purple">local_mall</i>
                <div class="mdui-list-item-content">催单</div>
                <i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
            </div>
            <div class="mdui-collapse-item-body mdui-list">
                <a href="uregent/list.html" class="mdui-list-item mdui-ripple ">查看</a>
            </div>
            <div class="mdui-collapse-item-body mdui-list">
                <a href="uregent/list_cancel.html" class="mdui-list-item mdui-ripple ">待取消报修单</a>
            </div>
        </div>

        <div class="mdui-collapse-item ">
            <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
                <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-deep-orange">layers</i>
                <div class="mdui-list-item-content">水电缴费</div>
                <i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
            </div>
            <div class="mdui-collapse-item-body mdui-list">
                <a href="bill/list.html" class="mdui-list-item mdui-ripple ">缴费记录</a>
                <a href="bill/add.html" class="mdui-list-item mdui-ripple ">缴费</a>
            </div>
        </div>
        <div class="mdui-collapse-item ">
            <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
                <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-green">widgets</i>
                <div class="mdui-list-item-content">个人中心</div>
                <i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
            </div>
            <div class="mdui-collapse-item-body mdui-list">
                <a href="information/list.html" class="mdui-list-item mdui-ripple ">个人信息</a>
                <a href="information/edit.html" class="mdui-list-item mdui-ripple ">修改信息</a>
            </div>
        </div>

    </div>
</div>

<div class="mdui-container" style="margin-top: 24px;">

    <div id="transAnimation"
         style="margin: 0 auto; width:200px; text-align: center;padding-top: 200px;transform: scale(1.5,1.5);">
        <div class="mdui-spinner mdui-spinner-colorful"></div>
    </div>

    <iframe
            style="transition-property: all;
                transition-duration: 1500ms;
                transition-timing-function: linear;
                border: 0;
                width: 100%;
                height:auto;
                opacity: 0;"
            id="main-iframe"
            src="demo.html">
    </iframe>

</div>


</body>

</html>